package com.weitu.permission.resource.mapper;

import com.weitu.permission.resource.entity.Resource;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ResourceMapper {
    int deleteByPrimaryKey(String id);

    int insertSelective(Resource record);

    List<Map> selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(Resource record);

    List<Resource> queryTreeList(Map map);

    int queryTreeCount(Map map);

    Resource selectById(String id);

    List<Map> selectResourcesByUserId(Map map);

    List<Map> selectAllResourcesByUserId(@Param("name") String name, @Param("deptId") String deptId);

    List<Map> selectAllResourcesByAuthorityId(@Param("authorityId") String authorityId);

    List<Map> selectAllButtonsByParentId(@Param("parentId") String parentId, @Param("name") String name, @Param("deptId") String deptId);

    List<Map> selectAllResourcsById(Map map);

    Resource selectByCode(@Param("code") String code);

    List<Map> selectAllByUserId(Map map);
}